export default {
  name: 'memberList',
  props: {
    modelData: {}
  },
  data() {
    return {
      assort: ['上班', '休息'],
      status: ['正在执行', '无指派'],
      rest: '休息',
      count: 0
    }
  },
  computed: {
    assortCount() {
      this.count = 0;
      let arr = new Array(this.assort.length);
      arr.fill(0);
      try {
        this.modelData.data.forEach(i => {
          if (i.rest) {
            arr[0] += 1
          } else {
            arr[1] += 1
          }
          this.count += 1
        })
        return arr     
      } catch(err) {
        return arr
      }
    }
  },
  methods: {
    nameFC(n) {
      return n.charAt(n.length-1)
    }
  }
}